import { createRouter, createWebHistory } from 'vue-router'
const routes = [
  {
    path: '/',
    redirect: '/login',
  }, {
    path: '/login',
    component: () => import('@/views/Login')
  },
  {
    path: '/layout',
    component: () => import('@/views/Layout'),
    redirect: '/layout/home',
    children: [
      {
        path: 'home',
        component: () => import('@/views/Layout/Home')
      }, {
        path: 'user',
        component: () => import('@/views/Layout/User')
      }
    ]
  }, {
    path: '/user_editor',
    component: () => import('@/views/Layout/User/UserEdit')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
